Integrand size = 29, antiderivative size = 23 \[ \int \frac {\sec (c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=\frac {x}{a}+\frac {i \log (\cos (c+d x))}{a d} \]
[Out]
Time = 0.08 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {3171, 3169, 3556} \[ \int \frac {\sec (c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=\frac {x}{a}+\frac {i \log (\cos (c+d x))}{a d} \]
[In]
[Out]
Rule 3169
Rule 3171
Rule 3556
Rubi steps \begin{align*} \text {integral}& = -\frac {i \int \sec (c+d x) (i a \cos (c+d x)+a \sin (c+d x)) \, dx}{a^2} \\ & = -\frac {i \int (i a+a \tan (c+d x)) \, dx}{a^2} \\ & = \frac {x}{a}-\frac {i \int \tan (c+d x) \, dx}{a} \\ & = \frac {x}{a}+\frac {i \log (\cos (c+d x))}{a d} \\ \end{align*}
Time = 0.15 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00 \[ \int \frac {\sec (c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=-\frac {i \log (i-\tan (c+d x))}{a d} \]
[In]
[Out]
Time = 0.51 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.96
method | result | size |
derivativedivides | \(-\frac {i \ln \left (i \tan \left (d x +c \right )+1\right )}{d a}\) | \(22\) |
default | \(-\frac {i \ln \left (i \tan \left (d x +c \right )+1\right )}{d a}\) | \(22\) |
risch | \(\frac {2 x}{a}+\frac {2 c}{a d}+\frac {i \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{a d}\) | \(38\) |
norman | \(\frac {x}{a}+\frac {i \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a d}+\frac {i \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a d}-\frac {i \ln \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}{a d}\) | \(72\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.13 \[ \int \frac {\sec (c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=\frac {2 \, d x + i \, \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )}{a d} \]
[In]
[Out]
\[ \int \frac {\sec (c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=\frac {\int \frac {\sec {\left (c + d x \right )}}{i \sin {\left (c + d x \right )} + \cos {\left (c + d x \right )}}\, dx}{a} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 101 vs. \(2 (21) = 42\).
Time = 0.25 (sec) , antiderivative size = 101, normalized size of antiderivative = 4.39 \[ \int \frac {\sec (c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=-\frac {-\frac {i \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} - \frac {i \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} + \frac {i \, \log \left (-\frac {2 i \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1\right )}{a}}{d} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 57 vs. \(2 (21) = 42\).
Time = 0.29 (sec) , antiderivative size = 57, normalized size of antiderivative = 2.48 \[ \int \frac {\sec (c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=-\frac {-\frac {i \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a} + \frac {2 i \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - i\right )}{a} - \frac {i \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}{a}}{d} \]
[In]
[Out]
Time = 22.63 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.78 \[ \int \frac {\sec (c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=-\frac {\left (2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\mathrm {i}\right )-\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )\right )\,1{}\mathrm {i}}{a\,d} \]
[In]
[Out]